<?php
ini_set('error_display','Off');
//error_reporting(E_ALL ^ E_NOTICE);
?>
&lt;?php
$name = 'ashwani';
echo $name;
?&gt;
<br />
<?php

echo 'ccc '+'abc';
echo "<br />";


$a = 5;
$b = 2;

echo $a ^ $b;

$a = $a*$b;
$b = $a / $b;
$a = $a / $b;
$a." ".$b;








function odd($var)
{
    // returns whether the input integer is odd
    return($var & 1);
}

function even($var)
{
    // returns whether the input integer is even
    return(!($var & 1));
}

$array1 = array("a"=>1, "b"=>2, "c"=>3, "d"=>4, "e"=>5);
$array2 = array(6, 7, 8, 9, 10, 11, 12);

echo "Odd :\n";
echo "<pre>";
print_r(array_filter($array1, "odd"));
echo "</pre>";
echo "Even:\n";
echo "<pre>";
print_r(array_filter($array2, "even"));
echo "</pre>";
?>

<?php

$entry = array(
             0 => 'foo',
             1 => false,
             2 => -1,
             3 => null,
             4 => ''
          );
echo "<pre>";
print_r(array_filter($entry));
echo "</pre>";




$cardType = 'V';
//$paymentModeArray = array('nmi_vbv', 'nmi_mcs','nmi_amx');
//$paymentModeArray  = array();
echo "AS: ".array_search('nmi_vbv', $paymentModeArray);
echo "<br />";
echo "IA: ".in_array('nmi_vbv', $paymentModeArray);

if(
	($cardType == 'V' && array_search('nmi_vbv', $paymentModeArray)) 
	|| 
	($cardType == 'M' && array_search('nmi_mcs', $paymentModeArray)) 
	|| 
	($cardType == 'A' && array_search('nmi_amx', $paymentModeArray))
){
	echo "IN";
}else{
	echo "Out";
}


echo "<br />########## FIBONECCI SERIES ################<br />";


$first = 0;
$second = 1;
$n = 10;
echo $first;
echo '<br />';
for($i=0;$i<$n;$i++){
	$third = $first + $second;
	$first = $second;
	$second = $third;
	echo $third;
	echo '<br />';
}

echo "<br />##########################<br />";


$x = "08";
$y = 08;
$z = " 47";

$x +=15; //23
$y +="15"; //15
$z +=11; //58

echo $x;
echo $y;
echo $z;
echo "<br />";

echo 07 + "10"; // 07+10 // 17
echo 08 + "10";  // 9 //10

echo "<br />##########################<br />";

$m1 = '1';
$m2 = '2';
echo "1 , 2";
for($i=1;$i<10;$i++)
{
    $n = ($m1+$m2)*2;
    $m1 = $m2;
    $m2 = $n;
    echo ",".$m2;

} 

echo "<br />##########################<br />";

$amit = array(true => "a", false => "b", NULL => 'd',4=>"m", "r");

echo '<pre>';
print_r($amit);
echo '</pre>';

echo "<br />##########################<br />";


$string = <<<XML
<?xml version='1.0'?> 
<Document>
 <title>Forty What?</title>
 <from>Joe</from>
 <to>Jane</to>
 <body>
  I know that's the answer -- but what's the question?
 </body>
</Document>
XML;

$xml = simplexml_load_string($string);

print_r($xml);

echo "<br />##########################<br />";


$a = 7;

if($a == 1){
	echo "first";
}else if ($a == 5){
	echo "second";
}elseif($a == 6) {
	echo "third";
}else {
	echo "end";
}

echo "<br />#########ECHO & PRINT#################<br />";

if(print ('abc')){
	echo "Ashwani";
}else{
	echo "Kumar";
}




echo "<br />#########ECHO & PRINT#################<br />";

echo 05;
echo (int)05;

?>


